import Common from '../../../common/common.js';
let common = new Common;
const app = getApp();
Page({
  data: {
    imgUrl: common.imgUrl,
    result: {}
  },
  queryStoreCardConfig: function (e) {
    let data = {
      orgSeq: getApp().globalData.orgSeq,
      userId: app.globalData.userId,
    }
    common.requestAjax('/api/user-service/v1/StoreCard/queryStoreCardConfig', 'post', data).then(res => {
      console.log(res)
      this.setData({
        result: res.data.result
      })
    }).catch(err => {
      console.log(err);
    })
  },

  // 修改店铺图片
  reconciliation: function (e) {
    wx.navigateTo({
      url: './shopImg/index',
    })
  },
  // 修改店员头像
  changeUserPic: function (e) {
    wx.navigateTo({
      url: './userImg/index',
    })
  },
  // 修改店铺风格
  winningRecord: function (e) {
    wx.navigateTo({
      url: `./changShopStyle/index?doorwayPic=${this.data.result.headPicUrl||this.data.userInfo.headPicUrl}`,
    })
  },
  panelData: function (e) {
    wx.navigateTo({
      url: './shopDesc/index',
    })
  },
  onLoad: function (options) {

  },
  onShow: function () {
    this.queryStoreCardConfig()
  },

})